In [1]:
%matplotlib notebook
In [2]:
import multicell
import numpy as np
In [3]:
sim = multicell.simulation_builder.generate_cell_grid_sim(20, 20, 1, 1e-3)
In [4]:
sim.enable_growth(n_steps=11)
We then register the growth method we would like to apply. In this case, it is linear_growth
, which requires a coefficient
parameter specifying the scaling to be applied at each time step, along each axis.
In [5]:
sim.register_growth_method(multicell.growth.linear_growth, {"coefficient": [1.1, 1.05, 1.]})
In [6]:
sim.enable_division()
sim.register_division_method(multicell.division.symmetrical_division)
We also register the division trigger, which is used to check if a cell needs to be divided. Here, it is a volume-related trigger, which requires a threshold.
In [7]:
sim.register_division_trigger(multicell.division.volume_trigger, {"volume_threshold": 2.})
In [8]:
sim.register_renderer(multicell.rendering.MatplotlibRenderer, None, {"view_size": 60, "view": (90, -90), "axes": False})
In [9]:
sim.renderer.display()
In [10]:
sim.simulate()